<?php

namespace SL\APIBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
 * Projet
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="SL\APIBundle\Entity\ProjetRepository")
 */
class Projet
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="nom", type="string", length=255)
     */
    private $nom;

    /**
     * @var string
     *
     * @ORM\Column(name="designation", type="string", length=255)
     */
    private $designation;

	/**
     * @ORM\OneToMany(targetEntity="SL\APIBundle\Entity\User", mappedBy="projet")
     */
	private $users;
	
	/**
     * @ORM\OneToMany(targetEntity="SL\APIBundle\Entity\Lot", mappedBy="projet")
     */
	private $lots;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set nom
     *
     * @param string $nom
     * @return Projet
     */
    public function setNom($nom)
    {
        $this->nom = $nom;
    
        return $this;
    }

    /**
     * Get nom
     *
     * @return string 
     */
    public function getNom()
    {
        return $this->nom;
    }

    /**
     * Set designation
     *
     * @param string $designation
     * @return Projet
     */
    public function setDesignation($designation)
    {
        $this->designation = $designation;
    
        return $this;
    }

    /**
     * Get designation
     *
     * @return string 
     */
    public function getDesignation()
    {
        return $this->designation;
    }
    /**
     * Constructor
     */
    public function __construct()
    {
        $this->users = new \Doctrine\Common\Collections\ArrayCollection();
        $this->lots = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * Add users
     *
     * @param \SL\APIBundle\Entity\User $users
     * @return Projet
     */
    public function addUser(\SL\APIBundle\Entity\User $users)
    {
        $this->users[] = $users;
    
        return $this;
    }

    /**
     * Remove users
     *
     * @param \SL\APIBundle\Entity\User $users
     */
    public function removeUser(\SL\APIBundle\Entity\User $users)
    {
        $this->users->removeElement($users);
    }

    /**
     * Get users
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getUsers()
    {
        return $this->users;
    }

    /**
     * Add lots
     *
     * @param \SL\APIBundle\Entity\Lot $lots
     * @return Projet
     */
    public function addLot(\SL\APIBundle\Entity\Lot $lots)
    {
        $this->lots[] = $lots;
    
        return $this;
    }

    /**
     * Remove lots
     *
     * @param \SL\APIBundle\Entity\Lot $lots
     */
    public function removeLot(\SL\APIBundle\Entity\Lot $lots)
    {
        $this->lots->removeElement($lots);
    }

    /**
     * Get lots
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getLots()
    {
        return $this->lots;
    }
}